//
//  UICollectionView+SKExtension.h
//  ShiKe
//
//  Created by 陆宁 on 2017/11/16.
//  Copyright © 2017年 LN. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UICollectionView (LNExtension)
/**
 * 使用以下两个方法注册的cell，identifier和类名保持一致
 * 推荐使用类名做cell的标识符
 * 使用该方法获取identifier字符串：
 * NSString *identifier = NSStringFromClass([UITableViewCell class])
 */
- (void)ln_registerCell:(Class)cls;
- (void)ln_registerNibCell:(Class)cls;

- (void)ln_registerCell:(Class)cls forCellReuseIdentifier:(NSString *)reuseIdentifier;
- (void)ln_registerNibCell:(Class)cls forCellReuseIdentifier:(NSString *)reuseIdentifier;

- (void)ln_registerCell:(Class)cls forSupplementaryViewOfKind:(NSString *)elementKind;
- (__kindof UICollectionReusableView *)ln_dequeueReusableWithHeadView:(Class)cls forIndexPath:(NSIndexPath *)indexPath;
- (__kindof UICollectionReusableView *)ln_dequeueReusableWithFooterViewView:(Class)cls forIndexPath:(NSIndexPath *)indexPath;
@end
